package com.one.consumer.user.ui;

import android.widget.EditText;
import android.widget.TextView;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.one.common.config.RouterPath;
import com.one.common.model.bean.UserInfoBean;
import com.one.common.view.widget.MyTitleBar;
import com.one.consumer.BaseActivityC;
import com.one.consumer.R;
import com.one.consumer.user.presenter.UserPresenter;
import com.one.consumer.user.ui.view.SetUserView;
import com.one.consumer.user.ui.view.UserView;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * author ：zhulunjun
 * email  ：zhulunjun@qq.com
 * date   ：2018/11/6 5:04 PM
 * description ：
 **/
@Route(path = RouterPath.SET_NICK_NAME)
public class SetNickNameActivity extends BaseActivityC<UserPresenter> implements SetUserView {
    @BindView(R.id.et_nick_name)
    EditText etNickName;
    @BindView(R.id.tv_submit)
    TextView tvSubmit;

    @Override
    protected void initPresenter() {
        mPresenter = new UserPresenter(this, this);
    }

    @Override
    public int getLayoutResId() {
        return R.layout.activity_set_nick_name;
    }

    @Override
    protected void initTitle() {
        super.initTitle();
        getMyTitleBar().setMode(MyTitleBar.Mode.BACK_TITLE)
                .setTitleText("修改昵称");
    }

    @OnClick(R.id.tv_submit)
    public void submit() {
        mPresenter.submit(null, etNickName.getText().toString());
    }

    @Override
    public void setUserInfo(UserInfoBean bean) {

    }

    @Override
    public void setAvatar(String url) {

    }
}
